﻿using PizzaService.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace PizzaService.Entities
{
    /// <summary>
    /// Bestellung
    /// </summary>
    public class Bestellung : ViewModelBase
    {
        public long ID_Bestellung { get; set; }

        private ObservableCollection<Speise> m_Speisen;
        public ObservableCollection<Speise> Speisen
        {
            get { return m_Speisen; }
            set
            {
                if (value != m_Speisen)
                {
                    this.m_Speisen = value;
                    RaisePropertyChanged(() => Speisen);
                }
            }
        }
        /// <summary>
        /// Bestellung dem Kunden zuweisen
        /// </summary>
        private Kunde m_Kunde;
        public Kunde Kunde 
        {
            get { return m_Kunde; }
            set
            {
                if (value != m_Kunde)
                {
                    this.m_Kunde = value;
                    RaisePropertyChanged(() => Kunde);
                }
            }
        }
        /// <summary>
        /// Lieferpauschale für die Bestellung
        /// </summary>
        private decimal m_Lieferpauschale;
        public decimal Lieferpauschale
        {
            get { return m_Lieferpauschale; }
            set
            {
                if (value != m_Lieferpauschale)
                {
                    this.m_Lieferpauschale = value;
                    RaisePropertyChanged(() => Lieferpauschale);
                }
            }
        }

        /// <summary>
        /// Summe 
        /// </summary>
        private decimal m_Summe;
        public decimal Summe
        {
            get { return m_Summe; }
            set
            {
                if (value != m_Summe)
                {
                    this.m_Summe = value;
                    RaisePropertyChanged(() => Summe);
                }
            }
        }
        /// <summary>
        /// Datum der Bestellung
        /// </summary>
        public DateTime Date { get; set; }

        public enum BestellStatus
        {
            WirdBearbeitet = 0,
            Ausgeliefert = 1,
            Abgebrochen = 2
        };
        /// <summary>
        /// Status der Bestellung
        /// </summary>
        private BestellStatus m_Status;
        public BestellStatus Status
        {
            get { return m_Status; }
            set
            {
                if (value != m_Status)
                {
                    this.m_Status = value;
                    RaisePropertyChanged(() => Status);
                }
            }
        }
        
    }
}
